package com.yanqu.road.entity.activity.stronghold;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.List;

@FieldTypeAnnotation(tableName = "t_u_activity_stronghold_base")
public class StrongholdUnionBase extends DataObject {
    @FieldTypeAnnotation(select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(update = true)
    private String unionUid;
    @FieldTypeAnnotation
    private int lv;
    @FieldTypeAnnotation
    private List<Integer> curProcess;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        this.unionUid = unionUid;
    }

    public int getLv() {
        return lv;
    }

    public void setLv(int lv) {
        this.lv = lv;
        setUpdateOption();
    }

    public List<Integer> getCurProcess() {
        return curProcess;
    }

    public void setCurProcess(List<Integer> curProcess) {
        this.curProcess = curProcess;
        setUpdateOption();
    }

    public void addProcess(int index, int addValue) {
        Integer value = curProcess.get(index);
        value = value + addValue;
        curProcess.remove(index);
        curProcess.add(index, value);
        setUpdateOption();
    }

}
